package com.hrms.patient.Service.Impl;

import com.hrms.patient.mapper.PatientMapper;
import com.hrms.patient.domain.Patient;
import com.hrms.patient.Service.PatientService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class PatientServiceImpl implements PatientService {
    @Autowired
    PatientMapper patientMapper;
    /*查询患者信息*/
   /* @Override
    public List<Patient> list() {
        return patientMapper.list();
    }
*/
    /*新增患者*/
    @Override
    public int save(Patient patient) {



        return patientMapper.insert(patient);
    }

    /*删除患者*/
    @Override
    public int delete(List<Integer> userIds) {
        return patientMapper.delete(userIds);
    }

    /*更新患者*/
    @Override
    public int update(Patient patient) {
        return patientMapper.update(patient);
    }


    @Override
    public List<Patient> selectPatient(String name, String phone) {
        List<Patient> list=patientMapper.selectPatient(name,phone);
        return list;
    }
}
